// 禁止修改
import Vue from 'vue'
import App from '@/app.vue';
import routes from 'libs/router'
import store from 'libs/store'
import index from 'libs/index'
import config from 'libs/config.json'
export function Bootstrap() { Vue.prototype.$vFN.Qk.bootstrap({ config }) }
export function Unmount() { Vue.prototype.$vFN.Qk.unmount({ config }) }
export function Mount({ data = {}, container }) {
    __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
    Vue.prototype.$vFN.Qk.mount({ config, data, container });
    let router = new VueRouter({ mode: 'history', base: config.path, routes });
    router.beforeEach((to, from, next) => { next(); });
    router.afterEach((to, from) => {});
    Vue.prototype.$vFN = data.$vFN;
    Vue.prototype.$vFN.Http.config.signName = config.name
    Vue.prototype.$vFN.Http.config.signType = config.type
    let _key = config.type + '_' + config.name;
    let _id = '#' + _key;
    index();
    window.instance[_key] = new Vue({ router, store, render: h => h(App), }).$mount(container ? container.querySelector(_id) : _id);
}